package com.tianji.promotion;

import com.tianji.common.utils.BeanUtils;
import com.tianji.promotion.domain.dto.CouponFormDTO;
import com.tianji.promotion.domain.po.Coupon;
import com.tianji.promotion.enums.DiscountType;
import org.junit.jupiter.api.Test;
import org.redisson.api.RLock;
import org.redisson.api.RedissonClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;


@SpringBootTest
public class test {
    @Autowired
    private RedissonClient redissonClient;
    @Test
    void t(){
        RLock lock = redissonClient.getLock("lock");
        boolean b1 = lock.tryLock();
        boolean b2 = lock.tryLock();
        System.out.println(b1);
        System.out.println(b2);
    }
}
